/**  
 * @date 2023-11-20 
 * @author Zhang Yu
 */
package com.springboot.template.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.*;

/**  
 * @description: TODO
 */
@RestController
@RequestMapping("/test")
@Api(value = "测试接口", tags = {"测试接口"})
public class TestController {
	
    @ApiOperation("测试")
	@GetMapping("/get")
	public String testRequest() {
		return "Hello GET";
	}
    
    @ApiOperation("测试")
	@GetMapping("/get1")
    @ApiImplicitParams({
		@ApiImplicitParam(paramType="query", name="userId", dataType="String", required=true, value="用户Id")
	}) 
	@ApiResponses({
		@ApiResponse(code = 200, message = "请求成功"),
	}) 
	public String testRequestWithParam(@RequestParam String userId) {
		return "Hello GET";
	}

}
